package com.hyt.it.ogt.ks.enums;

import lombok.Getter;

/**
 * <p>
 * BizStatusCode 枚举:
 * </p>
 *  ljd: 18001-18099
 *  chy: 18100-18199
 *  hbb: 18200-18299
 *  lhh: 18300-18399
 *
 * @author linjd
 * @since 2020/6/16 14:17
 */
/**
 * 定义规则
 *
 * 两位编号规则，共升级到8位异常码，
 *    规则：考务系统为例   42010101
 *    41  系统标识   【42：考式系统】
 *    01  业务功能板块【01：任务管理模块】
 *    01  接口序号    【01：任务分页查询接口】
 *    01  接口错误类型  【01：任务分页查询接口，size过大校验异常】
 */
@Getter
public enum BizStatusCode {
    APPLY_CHECK_SKIP_FAIL(42240101, "申请跳过失败"),
    MANUAL_REVIEW_FACE_APPLY(42240102, "请拍摄证件照片和本人照片"),
    GET_MANUAL_REVIEW_FACE_APPLY_INFO_ERROR(42240201, "获取跳过人脸验证信息失败"),
    LOGIN_NOT_BY_ID_CARD(42020201, "不允许身份证号登录"),
    LOGIN_NOT_BY_PHONE(42020202, "不允许手机号登录"),

    VIDEO_MONITOR_GET_SIGN_FAIL_CODE(42050101, "获取签名失败"),
    VIDEO_MONITOR_MOBILE_LOGIN_FAIL_CODE(42050201, "移动端登录失败"),
    VIDEO_MONITOR_MOBILE_GET_PHOTO_FAIL_CODE(42050301, "获取考生信息和照片失败"),
    VIDEO_MONITOR_COMPARE_FACE_FAIL_CODE(42050401, "人脸识别失败"),
    VIDEO_MONITOR_GET_SIGN_INFO_ERROR_CODE(42070101, "获取签名信息异常"),
    VIDEO_MONITOR_GET_SIGN_INFO_FINISH_EXAM(42070102, "考生已交卷"),
    //VIDEO_MONITOR_GET_MONITOR_STATE_ERROR_CODE(18326, "获取监控状态"),
    VIDEO_MONITOR_START_MONITOR_ERROR_CODE(42051501, "开始监控失败"),
    //VIDEO_MONITOR_START_RECORD_VIDEO_ERROR_CODE(18332, "开始录制视频异常"),

    DOING_INIT_PAPER(42010701, "正在初始化"),
    HAD_FINISH_EXAM(42010702, "考试已完成"),

    GET_QUESTION_FAIL(42010103, "获取试题号失败"),
    GET_SMALL_QUESTION_FAIL(42010102, "获取小题内容失败"),
    TAG_QUESTION_CODE_FAIL(42010104, "标记题号失败"),
    GET_SURPLUS_DURATION(42060101, "获取剩余时长"),
    //GET_CANDIDATE_INFO_FAIL(18006, "考生登录，获取考生信息失败"),
    GET_CANDIDATE_KNOWN(41020101, "获取考试须知"),
    QUERY_CANDIDATE_SCORE(41020102, "查询考生成绩"),
    //GET_CANDIDATE_CONFIG(18009, "获取考试配置"),
    SAVE_EXAM_ANSWER(42010105, "保存答案"),
    //SUBMIT_PAPER_CODE_FAIL(18017, "强制交卷失败"),
    GET_SUBJECTIVE_ANSWER_FAIL(42030101, "获取主观题答案失败"),

    /**
     *  ==================6. 考生考试过程=========================
     */
    REDO_EXAM_FAIL(42060102, "重置考试失败。"),
    REDO_EXAM_STATUS_FAIL(42060103, "考试未结束，不允许重置考试。"),
    REDO_EXAM_KW_FAIL(42060104, "考生考务状态重置失败，不允许重置考试。"),
    OVER_SCREEN_LOG_FAIL(42060701, "记录切屏次数失败"),
    //==================6.8 考生考试过程=========================
    PASS_STEP_PARAM_NONE(42060801, "获取跳过考试步骤，传参不允许为空。"),
    PASS_STEP_FAIL(42060802, "获取跳过考试步骤异常。"),

    UPLOAD_IMAGES_FORMAT_FAIL(42020101, "上传文件格式不正确"),
    //UPLOAD_NO_IMAGE_FAIL(18012, "文件未上传！"),
    SAVE_ENTITY_FAIL(42020102, "数据保存失败！"),
    EXAM_NO_PUBLISH_FAIL(42020103, "考试项目未发布！"),
    DO_LOGIN_FAIL(42020104, "用户登录失败！"),
    EXAM_LIST_FAILD(42021801, "进入考试失败"),
    SAVE_APP_LOG_FAIL(42022101,"写入手机操作轨迹信息失败"),

    DO_LOGIN_REPEAT_FAIL(42020112, "用户登录重复提交！"),
    ABSENT_LOGIN_FAIL(42020105, "缺考！"),


    KW_INVALID_PARAMETER(42020106, "传入参数错误"),
    //KW_EXAM_NO_EXIST(16402, "考试项目不存在"),
    //KW_EXAM_DELETED(16403, "该考试项目已经删除"),
    //KW_EXAM_CONFIG(16028, "获取考务考试配置信息失败"),
    //KW_REGISTER_INVALID_PARAMETE(16219, "注册信息参数校验错误"),
    //KW_REGISTER_REQUIRE_IS_NULL(16224, "存在必填项为空"),
    //KW_REGISTER_ERROR(16220, "注册异常"),

    CANDIDATE_COMMIT_PAPER_PARAM_VALID(42010603, "参数校验不沟通过"),
    CANDIDATE_COMMIT_PAPER_ERROR(42010604, "考生交卷接口"),
    GET_PAPER_ERROR(42010106, "获取试卷的题号失败"),
    INIT_PAPER_ERROR(42010107, "初始化考生试卷失败"),
    NOT_EXIST_EXAM(42010108, "考试ID不存在"),
    UPLOAD_FILE_FAIL(42010501, "文件未上传"),
    SAVE_QUESTION_FAIL(42010502, "保存答案失败"),
    MARK_QUESTION_FAIL(42010301, "标记题目失败"),
    QUERY_SCORE_FAIL(42040101, "查询分数失败"),
    GET_EXAM_INFO_FAIL(42020107, "获取考试信息失败"),
    GET_SKIN_INFO_FAIL(42020108, "获取皮肤失败"),
    OPEN_LOGIN_PAGE_FAIL(42020109, "获取考试信息异常"),
    UPDATE_CANDIDATE_FAIL(42020401, "更新考生信息失败"),
    GET_CANDIDATE_STATE_FAIL(42020701, "获取考生状态失败"),
    GET_EXAM_CONFIG_FAIL(42020601, "获取考试配置失败"),
    NOT_EXIST_CANDIDATE(42020602, "考生不存在"),
    NOT_EXIST_ADMISSION_NUMBER(42041102, "考生不存在"),
    NOT_EXIST_ID_CARD_NUMBER(42041113, "登录失败，该身份证号码未在考试系统，无法进行考试！"),
    NOT_EXIST_PHONE_NUMBER(42041114, "登陆失败，该手机号码未在考试系统中，无法进行考试！"),
    NOT_FINISH_EXAM(42040401, "考生不存在"),
    GET_CANDIDATE_INFO_ERROR(42041001, "获取考生信息失败"),
    //GET_PAPER_NONE(18332, "未找到试卷信息"),
    GET_CADIDATE_PAPER_NONE(42010107, "未找到考生绑定的试卷信息"),
    SAVE_QUESTION_FAIL_PUBLISH(42010503, "该考试项目已停用，已不允许保存[答案]数据。"),
    CANDIDATE_COMMIT_PAPER_ERROR_PUBLISH(42010505, "该考试项目已停用，已不允许保存[交卷]数据。"),
    CHARACTER_NOT_ALLOW_FINISH(42010605, "性格测试卷未作答完成，不允许交卷。"),
    HAVE_FINISH_EXAM(42021201, "本场考试您已经作答过！"),
    OUT_LOGIN_LIMIT(42021202, "超过登录次数限制！"),
    EXIT_MANY_ID_CARD(42020110, "有多个考生该身份证号，请使用准考证号登录"),
    NOT_ANSWER_ALL_QUESTION_CURRENT_PAGE(42010502, "当前页还有试题未作答！请先作答完所有小题！"),
    REPEAT_SUBMIT_FINISH_EXAM(42010601, "重复交卷"),
    TEST_HAVE_FINISHED(42010101, "考试已完成"),
    //RESET_LOGIN_COUNT_FAIL(18345, "重置登录次数失败"),
    WX_LOGIN_INVALID(42110701, "微信登录失效"),
    WX_LOGIN_FAIL(42101701, "微信登录失败"),
    WX_ADD_LOG_ERROR(42140101, "记录微信日志异常"),
    REDO_EXAM_PARAM_ERROR(42120603, "不满意重做参数不正确"),
    OVER_SCREEN_PARAM_NULL(42120701, "参数不正确"),
    GET_PAPER_NONE(18332, "未找到试卷信息"),
    RESET_LOGIN_COUNT_FAIL(18345, "重置登录次数失败"),
    GET_CANDIDATE_LOG_BEGIN_TIME_ERROR(42033801, "获取考生日志操作时间异常"),
    SET_PASS_CANDIDATE_PHOTO_ERROR(42034102, "设置跳过照片比对异常"),
    KW_API_GET_APPLY_CHECK_ERROR(42034901, "异常管理审核根据id查询待审核异常"),
    KW_API_FIND_APPLY_CHECK_PASS_LIST_ERROR(42034501, "异常管理审核根据异常类型和考试查询下一条待审核异常"),

    //===========2.1.20==============
    EXAM_BASE_INFO_FAIL(42022001, "获取考试基本信息异常"),

    REGISTER_INVALID_PARAMETER(42020901, "注册信息参数校验错误"),
	//REGISTER_EXIST_EMAIL_PHONE(18201, "注册信息中手机+邮箱已存在"),
	REGISTER_ERROR(42020902, "注册异常"),
	GET_REGISTER_INFO_ERROR(42040102, "获取注册信息异常"),
	QUERY_SCORE_DETAIL_FAIL(42040103, "查询分数明细失败"),
	QUERY_CANDIDATE_DETAIL_SCORE_FAIl(42040104, "查询考生成绩明细"),
	//PHOTO_UPLOAD_BY_HAND_FAIL_CODE(18206, "考生抓拍照片上传异常"),
	CANDIDATE_APP_LOGIN_FAIL_CODE(42060105, "获取考生移动端登录异常"),
	ENCLOURSE_FILE_ERROR(42021103, "附件超过配置范围"),
	UPLOAD_FILE_ERROR(42021203,"上传考生照片异常"),
	EXAM_NOT_START(42020111, "考试时间未到"),
    GET_COUNT_DOWN_ERROR(42011301, "获取开考倒计时异常"),
	GET_PUBLISH_EXAM_ERROR(42011401, "获取是否发布考试异常"),
	//LOGIN_ERROR(18216, "登录信息错误!"),
	GET_REMAIN_SCREEN_NUM_ERROR(42061401, "获取切屏剩余次数异常"),
	GET_EVAL_REPORT_FAILD_REASON(18221, "获取测评报告失败原因异常"),
	GET_INTERVIEW_URL_ERROR(42011101, "获取供应商跳转地址异常"),
    UPDATE_CANDIDATE_PROCESS_PARAM_WRONG(42030127, "更新过程表参数不对"),
    ERROR_UPDATE_CANDIDATE_PROCESS(42030128, "更新过程表异常"),
    UPDATE_CANDIDATE_BACKUP_ERROR(42060113,"更新考生考试考生表是否备份字段异常"),

    //------------kwclient ----------------//
    QUERY_CANDIDATE_PAPER_ERROR(42031501, "查询考生与试卷关系列表异常"),
    GET_PAPER_KG_SCORE_ERROR(42032301, "获取客观题成绩异常"),
    GET_XY_SCORE_ERROR(42032401, "获取兴业银行考生成绩异常"),
    GET_XY_USE_TIME_ERROR(42032501, "获取兴业银行考生考试用时异常"),
    GET_EXAM_ANSWER_TIME_ERROR(42032601, "获取考试答题时长统计异常"),
    GET_CANDIDATE_VAILD_ERROR(42033001,"获取考生身份验证状态异常"),
    PUSH_SCORE_TO_CJ_ERROR(42033002, "推送考生成绩到成绩系统异常"),
    SET_PASS_DUAL_MONITORING_ERROR(42031001, "设置考生跳过双监控验证异常"),
    GET_MONITOR_SCREEN_ERROR(42031101, "获取大屏监控数据异常"),
    END_WHOLE_EXAM_ERROR(42031201, "获取结束整场考试数据异常"),
    GET_CANDIDATE_ANSWER_FAIL(42030601, "获取主观题答案失败"),
    KW_PHOTO_UPLOAD_BY_HAND_FAIL_CODE(42030801, "重置app登录状态异常"),
    KS_CANCEL_SUBMIT_PAPER_ERROR(42030901, "撤销考生交卷异常"),
    GET_CANDIDATE_OBJECT_SCORE_CODE(42030701, "获取考生客观题总分异常"),
    GET_XY_REPORT_AND_SEND_DAYI_ERROR(42031601, "获取测评报告、推送成绩报告给大易异常"),
    GET_CANDIDATE_ALL_PAPER_LIST_FAIL(42031701, "获取考生所考试卷包的所有试卷剩余时长"),
    API_KW_GET_SCORE(42030102, "获取考试得分接口错误"),
    API_KW_GET_ACCURACY(42030201, "获取考生正确率接口错误"),
    API_KW_GET_EXAM_LOG(42030301, "获取考生事件接口错误"),
    API_KW_CURRRENT_EXAM_ERROR(42040711, "判断当前考试是否为现考现评错误"),
    GET_CANDIDATE_PAPERS_ERROR(42033601, "获取考生客观题分数异常"),
    GET_CANDIDATE_SUBJECT_PAPER_INFO_ERROR(42033701, "获取考生科目试卷信息异常"),
    CANDIDATE_UN_LOGIN(42031903, "考生未登录"),
    CANDIDATE_CAN_NOT_SET_PASS_FACE(42031904, "考生已通过身份验证或进入考试，无需设置跳过人脸验证"),
    CANDIDATE_FACE_VERIFY_FAIL(42031905, "记录人脸核身验证失败报错"),
    VAILD_DOWNLOAD_SCORE_ERROR(42033901, "验证是否可以导出成绩异常"),
    HAS_UNCOMPLETE_CANDIDATE(42033902, "存在未完成考试的考生，请先”结束考试“或强制结束已登录、考试中、中断的考生"),
    HAS_NOT_VAIID_SCORE(42033903, "请校验数据后再导出"),
    CALC_SCORE_ERROR(42340101, "统分失败"),

    PASS_STEP_SET_FAIL(42034001, "设置跳过考试步骤异常。"),
    PASS_STEP_SET_EXIST(42034002, "该考生已设置跳过，无需重复操作。"),
    PASS_STEP_SET_NO_LOGIN(42034003, "考生未登录，不能设置跳过。"),
    PASS_STEP_SET_OVER_EXAM(42034004, "考试已结束，不能设置跳过。"),

    GET_PASS_STEP_SET_DATE_FAIL(42034101, "获取设置跳过考试时间异常。"),

    // ============================websocket 消息相关 开始============================
    CANDIDATE_WEBSOCKET_MSG_CONFIRM_FAIL(42084101, "考生确认收到消息失败"),
    // ============================websocket 消息相关 结束============================


    //----uaApi----//
    VALID_CANDIDATE_ACCOUNT(18330, "校验账号是否存在"),
    GET_KG_SCORE_FOR_PAPER_ERROR(42033701, "获取考生单张试卷客观题异常"),
	SERVICE_ERROR(18015, "服务熔断-服务不可用"),
    CANDIDATE_ANSWER_LOG_ERROR(41150102, "查询考生mongodb轨迹失败"),


    PICTURE_ANSWER_ITEM_UPLOAD_LIMIT(41210101, "上传的答案图片超过最大限制"),
    PICTURE_ANSWER_ITEM_UPLOAD_NOT_CURRENT_ITEM(41210102, "上传的图片非当前题"),
    PICTURE_ANSWER_ITEM_UPLOAD_PARAM_WRONG(41210103, "上传的图片参数不正确"),
    PICTURE_ANSWER_ITEM_UPLOAD_ERROR(41210104, "图片保存失败"),
    PICTURE_ANSWER_ITEM_UPLOAD_CANDIDATE_FINISH_EXAM(41210105, "考生已交卷，不允许上传图片"),
    PICTURE_ANSWER_ITEM_UPLOAD_FINISH_EXAM(41210106, "已结束考试或未发布，不允许上传图片"),
    PICTURE_ANSWER_ITEM_DEL_CANDIDATE_FINISH_EXAM(41210301, "考生已交卷，不允许删除图片"),
    PICTURE_ANSWER_ITEM_DEL_FINISH_EXAM(41210302, "已结束考试或未发布，不允许删除图片"),


    FILE_ANSWER_ITEM_UPLOAD_LIMIT(41220101, "上传的答案超过最大限制"),
    FILE_ANSWER_ITEM_UPLOAD_NOT_CURRENT_ITEM(41220102, "上传的非当前题"),
    FILE_ANSWER_ITEM_UPLOAD_PARAM_WRONG(41220103, "上传的参数不正确"),
    FILE_ANSWER_ITEM_UPLOAD_ERROR(41220104, "保存答案失败"),
    FILE_ANSWER_ITEM_UPLOAD_CANDIDATE_FINISH_EXAM(41220105, "考生已交卷，不允许上传"),
    FILE_ANSWER_ITEM_UPLOAD_FINISH_EXAM(41220106, "已结束考试或未发布，不允许上传"),
    FILE_ANSWER_ITEM_DEL_CANDIDATE_FINISH_EXAM(41220301, "考生已交卷，不允许删除"),
    FILE_ANSWER_ITEM_DEL_FINISH_EXAM(41220302, "已结束考试或未发布，不允许删除"),

    GET_HW_OBS_TEMP_CREDENTIAL(41120301, "获取华为云存储临时凭证失败"),

    CANDIDATE_FINISH_EXAM_NOT_TO_LOGIN(41070401, "考生已完成考试不允许二次登录"),

    CANDIDATE_NOT_IN_RECORD(41070402, "考生不存在记录"),

    //验证保存答案相关
    ANSWER_EXAMID_EXISTS(41010520,"保存答案必传参数缺失"),
    ANSWER_PAPER_EXISTS(41010521,"保存答案-考生试卷不存在记录"),
    ANSWER_CANDIDATE_PROCESS_EXISTS(41010522,"保存答案-考生未登录"),
    ANSWER_TYPE_USERANSWER_NOT_MATCH(41010523,"试题类型-考生答案不匹配"),
    RESET_ANSWER_TIME_ERROR(42341201,"重置答题时长异常"),

    CANDIATE_ANSWER_LOG_ERROR(41340202,"查询考生作答轨迹异常"),

    CANDIATE_OTHER_LOG_ERROR(41340203,"查询考生其他轨迹异常"),

    CANDIDATE_ANSWER_BY_EXAM_ID_ERROR(41341001,"根据考试ID获取考生答案异常"),

    CANDIDATE_OTHER_LOG_NOT_EXIST_ERROR(41340204,"查询考生其他轨迹找不到"),

    CANDIDATE_OTHER_LOG_SEND_STUDENT_MSG_ERROR(41340205,"给学生发送审核消息错误"),

    CANDIDATE_OTHER_LOG_OPERATE_CONTENT_EMPTY(41340206,"轨迹内容为空"),
    CANDIDATE_OTHER_LOG_GET_DEVICE_VERIFY_RESULT_ERROR(41340207,"考生获取设备检测审核结果出错"),

    CANDIDATE_APPLY_CHECK_MSG_NOT_EXIST(41340208,"考生审核消息发送记录找不到"),

    CANDIDATE_APPLY_CHECK_NOT_EXIST(41340209,"考生审核记录找不到"),
    CANDIDATE_APPLY_CHECK_DEVICE_ALREADY_PASS(41340210,"设备检测跳过已经被通过"),
    CANDIDATE_APPLY_CHECK_ERROR(41340211,"考生审核报错"),

    CANDIATE_ANSWER_ERROR(41340401,"查询考生答题记录异常"),
    DATA_CHECK_ERROR(42035101, "数据核查异常"),

    FIND_APPLY_CHECK_CANDIDATE_ID_AUDIT_ERROR(42035001,"根据考试id查询审核通过的考生id列表异常"),


    GET_CANDIDATE_MESSAGE_FAIL(42130101,"获取消息对话列表失败"),
    GET_APPLY_CHECK_UN_PASS_FACE_TIME_ERROR(42035401,"获取考生人脸核身审核不通过时间异常"),
    GET_CANCEL_COMMIT_TIME(42035501,"获取撤销交卷时间异常"),
    TIMING_SAVE_ERROR(42160301,"考生作答用时不能为空"),
    TIMING_SAVE_ITEMID_ERROR(42160302,"考生作答进度保存试卷id不能为空"),



    SAVE_ANSWER_LOG_FAIL(42130102, "保存答题轨迹日志失败"),
    SAVE_OTHER_LOG_FAIL(42130103, "保存其它轨迹日志失败"),
    UPDATE_CANDIDATE_MESSAGE_STATE_FAIL(42130104,"获取消息对话列表失败"),
    //==================18 机构任务类 =========================
    //18.1
    GET_EXAM_OFFICE_INFO_FAIL(42180101,"获取考试机构信息异常。"),
    GET_EXAM_OFFICE_INFO_NONE(42180102,"获取考试机构信息时，平台端未返回数据。"),

    SYNC_ES_BY_EXAM_ID(42360101,"根据考试ID同步ES数据异常。"),

    //18.2
    GET_EXAM_OFFICE_LIST_FAIL(42180201,"获取机构任务列表异常。"),

    TK_SUCCESS_OK(20000, "题库-成功码"),
    OGT_SUCCESS_OK(12001, "用户权限-成功码"),
    KWGOV_SUCCESS_CODE(20000, "政企考务成功码"),
    KW_SUCCESS_OK(20000, "考务-成功码"),
    PJ_SUCCESS_CODE(20000, "评卷成功码"),
    KS_SUCCESS_OK(20000, "成功码");


    private Integer code;
    private String msg;

    BizStatusCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
